{extend name="web/public/base" /}
{block name="header"}
{/block}
{block name="main"}
<section class="scrollable padder">
    <ul class="breadcrumb no-border no-radius b-b b-light pull-in">
        <li><a><i class="fa fa-home"></i> 首页</a></li>
        <li class="active">会员管理</li>
        <li class="active">{$title}</li>
    </ul>
    <div style="margin-bottom: 10px;">
        <a class="btn btn-primary" href="{:url('liuyan')}">写信息</a>
        <a type="button" class="btn btn-primary" href="{:url('',array('type'=>2))}">发件箱</a>
        <a type="button" class="btn btn-primary" href="{:url('')}">收件箱</a>
    </div>
    <div class="row">
        <div class="col-sm-12">
            <section class="panel panel-default">
                <header class="panel-heading"> {$title}</header>
                {include file="web/public/search" /}
                {notempty name="_list"}
                <div class="table-responsive">
                    <table class="table table-striped table-hover b-t b-light text-sm">
                        <thead>
                        <tr>
                            <th width="80px" onclick="sort('user_num',this)" class="th-sortable active"
                                data-toggle="class">ID号 <span class="th-sort"> <i
                                    class="fa fa-sort-down text"></i> <i class="fa fa-sort-up text-active"></i> <i
                                    class="fa fa-sort"></i> </span>
                            </th>
                            <th>时间</th>
                            <th>发件人</th>
                            <th>收件人</th>
                            <th>信息主题</th>
                            <th>信息内容</th>
                            <th>回复内容</th>
                            <th>回复时间</th>
                            <th>状态</th>
                            <th>操作</th>
                        </tr>
                        </thead>
                        <tbody>
                        {volist name='_list' id='vo'}
                        <tr>
                            <td>{$vo.id}</td>
                            <td>{$vo.create_time|date='Y-m-d H:i:s',###}</td>
                            <td>{$vo.fromuserid|getInfo='usernumber',###}</td>
                            <td>{$vo.touser|getInfo='usernumber',###}</td>
                            <td>{$vo.title}</td>
                            <td>{$vo.content}</td>
                            {eq name="vo.status" value="1"}
                            <td>尚未回复</td>
                            <td>尚未回复</td>
                            <td>尚未回复</td>
                            {if condition="$vo['touser'] eq 0"}
                            <td><a href="{:url('liuyanReply',array('id'=>$vo['id']))}">回复</a></td>
                            {else/}
                            <td>无</td>
                            {/if}
                            {/eq}
                            {eq name="vo.status" value="2"}
                            <td>{$vo.reply}</td>
                            <td>{$vo.reply_time|date='Y-m-d H:i:s',###}</td>
                            <td>已回复</td>
                            <td>无</td>
                            {/eq}
                        </tr>
                        {/volist}
                        </tbody>
                    </table>
                </div>
                <footer class="panel-footer">
                    <div class="row">
                        <div class="text-right text-center-xs">
                            {$page}
                        </div>
                    </div>
                </footer>
                {else/}
                <div style="text-align: center">
                    <image src="__PUBLIC__/images/empty.jpg"></image>
                </div>
                {/notempty}
            </section>
        </div>
    </div>
</section>
{/block}
{block name="footer"}
<script>

</script>
{/block}